package com.gradecak.alfresco.mvc.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.transaction.annotation.Propagation;

@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface AlfrescoTransaction {

  /**
   * <code>true</code> if the transaction is read-only.
   * <p>
   * Defaults to <code>false</code>.
   */
  boolean readOnly() default false;

  /**
   * The transaction propagation type.
   * <p>
   * Defaults to {@link Propagation#REQUIRED}.
   */
  Propagation propagation() default Propagation.REQUIRED;

}
